#include "discovery/eventfd_receiver.h"

EventFdReceiver::EventFdReceiver(io_context& io, const std::string& identifier)
    : io_(io), identifier_(identifier), running_(false) {
}

EventFdReceiver::~EventFdReceiver() {
    stop();
}

void EventFdReceiver::stop() {
    running_ = false;
}

void EventFdReceiver::set_transfer_callback(TransferCallback callback) {
    transfer_callback_ = std::move(callback);
}

void EventFdReceiver::set_connection_callback(ConnectionCallback callback) {
    connection_callback_ = std::move(callback);
}

bool EventFdReceiver::is_running() const {
    return running_.load();
}
